
<?if(isset($gd)):?>
<div class="row">
	<div class="small-6 columns">
		<p class="lead-title">Elementary Grading System</p>
			<?
				$names = ['aplus','aflat','aminus','bplus','bflat','bminus','cplus','cflat','cminus','dflat','ng'];
				if($gd)
				{
					foreach($gd as $k => $v)
					{
						${$k.'_fromval'} = $v['rangefrom'];
						${$k.'_toval'} = $v['rangeto'];
					    // ${$k.'_from'} = $k.'['.$k.'_from]['.$v['id'].']';
					    // ${$k.'_to'} = $k.'['.$k.'_to]['.$v['id'].']';
						
						${$k.'_from'} = $v['id'].'['.$k.'_from]';
					   ${$k.'_to'} = $v['id'].'['.$k.'_to]';
					}
				
				}else{
					foreach($names as $v)
					{
						${$v.'_fromval'} = '';
						${$v.'_toval'} = '';
						${$v.'_from'} = 'data['.$v.']['.$v.'_from]';
						${$v.'_to'} = 'data['.$v.']['.$v.'_to]';
					}
				}
			?>
			<table class="table table-striped">
				<tr class="info">
					<td colspan="2">Letter</td>
					<td class="align-center">Range From</td>
					<td class="align-center">&nbsp;</td>
					<td class="align-center">Range To</td>
				</tr>
				<tr>
					<td>A+</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$aplus_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$aplus_toval;?>
					</td>
				</tr>
				<tr>
					<td>A</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$aflat_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$aflat_toval;?>
					</td>
				</tr>
				<tr>
					<td>A-</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$aminus_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$aminus_toval;?>
					</td>
				</tr>
				<tr>
					<td>B+</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$bplus_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$bplus_toval;?>
					</td>
				</tr>
				<tr>
					<td>B</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$bflat_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$bflat_toval;?>
					</td>
				</tr>
				<tr>
					<td>B-</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$bminus_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$bminus_toval;?>
					</td>
				</tr>
				<tr>
					<td>C+</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$cplus_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$cplus_toval;?>
					</td>
				</tr>
				<tr>
					<td>C</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$cflat_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$cflat_toval;?>
					</td>
				</tr>
				<tr>
					<td>C-</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$cminus_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$cminus_toval;?>
					</td>
				</tr>
				<tr>
					<td>D</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$dflat_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$dflat_toval;?>
					</td>
				</tr>
				<tr>
					<td>NG</td>
					<td><span><i class="icon-arrow-right"></i></span></td>
					<td class="align-center">
						<?=$ng_fromval;?>
					</td>
					<td class="align-center">
						<span><i class="icon-minus"></i></span>
					</td>
					<td class="align-center">
						<?=$ng_toval;?>
					</td>
				</tr>
			</table>
	</div>
	<div class="small-6 columns">
		<p class="lead-title">Kinder</p>
			<table class="table">
				<tr>
					<td><h4>Hooray</h4></td>
					<td><code>yellow</code></td>
					<td><img src="<?=image_url('symb-yellow.png');?>" width="75" ></td>
				</tr>
				<tr>
					<td><h4>Nice</h4></td>
					<td><code>red</code></td>
					<td><img src="<?=image_url('symb-red.png');?>" width="75" ></td>
				</tr>
				<tr>
					<td><h4>Good</h4></td>
					<td><code>blue</code></td>
					<td><img src="<?=image_url('symb-blue.png');?>" width="75" ></td>
				</tr>
				<tr>
					<td><h4>Can Do Better</h4></td>
					<td><code>green</code></td>
					<td><img src="<?=image_url('symb-green.png');?>" width="75" ></td>
				</tr>
				<tr>
					<td><h4>Help</h4></td>
					<td><code>orange</code></td>
					<td><img src="<?=image_url('symb-orange.png');?>" width="75" ></td>
				</tr>
			</table>
	</div>
</div>
	<?endif;?>